Skip to content

Re-type workflow summary once at flow start ingress to avoid per-poll deserialization - #225

Merged
akashdw merged 1 commit into
mainfrom
ad/workflow-summary-convert-value-fix
Jul 2, 2026
Merged

Re-type workflow summary once at flow start ingress to avoid per-poll deserialization#225
akashdw merged 1 commit into
mainfrom
ad/workflow-summary-convert-value-fix

Conversation

@akashdw

@akashdw akashdw commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Pull Request type

  • [ x] Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew build --write-locks to refresh dependencies)
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

When a flow starts on a node that does not own its group, the workflow summary is sent over REST and deserialized into an untyped Map, so flow.getInput() holds a LinkedHashMap instead of a WorkflowSummary. Every step poll then re-runs a full Jackson convertValue over the whole summary and discards the result, which shows up as significant CPU and allocation/GC overhead on the step execute path, growing with workflow size.

This change re-materializes the summary into a typed WorkflowSummary once at the flow-start REST ingress, so downstream reads take the cheap cast path instead of converting on every poll.

@rdeepak2002 rdeepak2002 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for optimizing this!

@akashdw
akashdw merged commit 27050de into main Jul 2, 2026
1 check passed
@praneethy91

Copy link
Copy Markdown
Collaborator

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants